package com.aube.plugin.previous;

import java.io.Serializable;
import java.util.LinkedHashMap;

/**
 * Created by huyaonan on 17/1/22.
 */
public class PreviousModel implements Serializable {
    public String picUrl;
    public int width;
    public int height;

    public void setItem(String key, Object value) {
        if (value == null)
            return;
        try {
            if ("picInfo".equalsIgnoreCase(key)) {
                LinkedHashMap<String, Object> lhm = (LinkedHashMap<String, Object>) value;
                if (value != null) {
                    picUrl = (String) lhm.get("picurl");
                    width = (int) ((double) lhm.get("width"));
                    height = (int) ((double) lhm.get("height"));
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
